home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / littlest / littl-st.lha / install.ms < prev    next >
Text File  |  1993-08-10  |  10KB  |  261 lines

  1. .NH
  2. Installation Instructions
  3. .PP
  4. The following lists installation instructions for those systems to which
  5. Version 3 of Little Smalltalk has been ported at present.
  6. Note that installation involves the creation of two programs.
  7. The first, called ``initial'', is run once to create the initial object
  8. image (usually a filed called ``systemImage'').  The second program is the
  9. smalltalk interpreter.  To run smalltalk, both these files must be
  10. accessible.  Systems that use the supplied Makefile run initial
  11. automatically; in some other systems you may need to do this manually. 
  12. .PP
  13. If you receive the distribution on Mac or IBM disks and you want to run the
  14. system under Unix you must ``undo'' some of the changes described below.
  15. .NH 2
  16. Atari
  17. .PP
  18. I've been told (no first hand exprience) that the code works on the atari.
  19. I've set up a minimal description in env.h - could somebody tell me if
  20. the atari supports prototypes, signals, or some of the other features?
  21. .PP
  22. You do have to make the 'rb' changes described for the IBM PC (below),
  23. however you keep the rm instruction instead of DEL, and change the editor
  24. to whatever your system has (memacs?).
  25. .NH 2
  26. Berkeley Unix (both 4.2 and 4.3)
  27. .PP
  28. To define, simply say ``make bsdtty'' to make version with tty interface.
  29. On systems supporting version 11 of x-windows, you can say ``make bsdx11''.
  30. The environment variable ST_LIBRARY can be defined and the standard system
  31. image will be taken from there (see st.c).
  32. .NH 2
  33. Gnu C Compiler (Sequent Balance)
  34. .PP
  35. If at all possible, \fIUse the Gnu C Compiler\fP.  I have found the code to
  36. be much smaller (up to 1/3 smaller) and much faster (up to twice as fast).
  37. So far this has been used on the Sequent Balance system.
  38. .PP
  39. Note that these sources support old style prototypes, as are used in
  40. Lightspeed C and Turbo C, and not the newer ANSI prototypes as are used in
  41. the gcc compiler.
  42. So do not define PROTO when using the gcc compiler
  43. .NH 2
  44. HP-UX
  45. .PP
  46. Simply say ``make sysvtty'' to make a version with the tty interface.
  47. (As of yet, I don't have access to a system v system with an X-window
  48. interface, so I can't test that code).
  49. .PP
  50. (Using the -O optimising flag sometimes causes some HP machines to go into
  51. an infinite loop.  Turning off the -O flag seems to always fix this).
  52. .NH 2
  53. IBM PC / Turbo C compiler
  54. .LP
  55. \fBNote:\fP If you receive the sources on 5\(12 disks containing both
  56. source and executable, the following changes have already been made 
  57. to the system.
  58. .PP
  59. Define the symbol TURBOC at the beginning of the file env.h.
  60. .PP
  61. Edit the file file.st, changing the command used to delete files from rm to
  62. del (notice the space following the del):
  63. .DS I
  64.     delete
  65.         ('del ', name) unixCommand
  66. .DE
  67. In the file file.st change the mode on the command to save images from w to wb.
  68. .DS I
  69.     saveImage: name    
  70.         scheduler critical: [
  71.             " first get rid of our own process "
  72.             scheduler removeProcess: scheduler currentProcess.
  73.         File new;
  74.             name: name;
  75.             open: 'wb';
  76.             saveImage;
  77.             close ]
  78. .DE
  79. In a similar manner change the mode on the file open in the initialize
  80. method in file tty.st to use wb instead of w.
  81. .DS I
  82.     initialize
  83.         " initialize the initial object image "
  84.         self createGlobals.
  85.         File new;
  86.             name: 'systemImage';
  87.             open: 'wb';
  88.             saveImage;
  89.             close.
  90. .DE
  91. And also in tty.st change the editor from vi to me (or whatever your
  92. favorite editor happens to be).
  93. .DS I
  94.         editor \(<- 'me'.
  95. .DE
  96. .PP
  97. Because of segmentation limits it is not possible to have an object table
  98. any larger than 6500 objects (the current default).
  99. This value is set by a define found in memory.h
  100. .DS I
  101. # define ObjectTableMax 6500
  102. .DE
  103. .PP
  104. Compile in the compact mode (small code, large data).
  105. .NH 2
  106. Macintosh Lightspeed C
  107. .PP
  108. NOTE: If you get the distribution on 3\(14 MAC Disks the source code
  109. changes described below have probably already been made for you.
  110. .PP
  111. The mac distrubtion disk contains the following.
  112. .IP (a)
  113. A folder called ``C Sources'' that contains (naturally) all the C sources.
  114. .IP (b)
  115. A folder called ``ST Sources'' that contains (also naturally) all the
  116. Smalltalk sources, plus an application called ``initial'' that can be used
  117. to create or recreate the initial object image.  To make changes to the
  118. image, simply edit the appropriate smalltalk files, run initial, and move
  119. the file ``systemImage'' to the appropriate location.
  120. .IP (c)
  121. Two Lightspeed C projects called ``TextEdit'' and ``Stdwin'', containing
  122. code taken from Guido van Rossums Standard Windows package.
  123. .IP (d)
  124. A file called ``systemImage'', which is the output of the application from
  125. part (b)
  126. .IP (e)
  127. An application called ``st'', which is the smalltalk interpreter.
  128. .IP (f)
  129. A folder called ``misc'' that contains various different files, such as
  130. documentation and other things.
  131. .PP
  132. It is only necessary to recompile if you make changes to the C source.
  133. If you make changes to the Smalltalk source you only need to rerun the
  134. application called ``initial'' contained in the ``ST Sources'' folder.
  135. .PP
  136. If you get the sources from some other location (say off the net), you must
  137. make the following alterations.
  138. Change the mode on the file open in the saveImage command (in file.st) and
  139. in the initalize command (file stdwin.st).  Define the symbol LIGHTC at the
  140. beginning of the file env.h  (See instructions for the IBM
  141. PC above for a fuller explanation).
  142. .PP
  143. To compile you need guido van rossums Standard Windows package.
  144. Follow his instructions to create the stdwin and textedit projects (these
  145. are already on the distribution disk).  To make the initial program, create
  146. a project ``initialProj'' with segments as follows.  In the first segment 
  147. place MacTraps.
  148. In the second segment place Stdwin.  In the third place TextEdit.
  149. In the forth place the Unix library files math, stdio, storage, strings and
  150. unix.  In the fifth place the sources filein.c, initial.c, interp.c,
  151. memory.c, names.c, news.c, primitives.c, unixio.c and winprims.c.
  152. In the sixth and final segment place lex.c and parser.c.
  153. To create the st program use the same structure, subsituting st.c for
  154. initial.c.
  155. You must check the ``separate STRS'' option on both projects.
  156. .PP
  157. Make sure when you run the initial object that all the smalltalk sources
  158. are in the current directory; it does not complain if it can't open a file,
  159. it simply goes on.
  160. Also when you fileIn a file, the file must be in the current directory.
  161. .PP
  162. The Mac version uses the windowing interface.
  163. It is currently very fragile.  (A few known bugs; can't restore from saved
  164. image files, output sometimes goes wrong places, output often doesn't
  165. appear until you click the mouse).
  166. .PP
  167. If you want, you can use a tool like ResEdit to change ower of the ST
  168. application and the systemImage file to a unique 4-char code (I use
  169. ``l.st'').  Double clicking the image will then open ST.
  170. (Anybody know how to get Lightspeed C to do this automatically?).
  171. .NH 2
  172. Sequent Balance
  173. .PP
  174. Say ``make bsdtty'' to make a tty interface system.
  175. .NH 2
  176. TekTronix 4315, Green Hills C Compiler
  177. .PP
  178. Say ``make bsdtty'' to make a tty interface system.
  179. Say ``make bsdx11'' to make an x-windows interface system (still somewhat
  180. buggy).
  181. .NH 2
  182. System V
  183. .PP
  184. On most system V systems you should be able to say simply ``make sysvtty''
  185. to make a version using the tty interface.
  186. .NH 2
  187. VAX / VMS
  188. .PP
  189. Since VMS doesn't understand Unix Makefiles, the distribution tape supplies
  190. a command file you can use.
  191. First define the symbol VMS near the begining of the file env.h,
  192. then execute the command file called vms.com.
  193. This makes a version using the tty interface.
  194. A VMS version using the X-windows interface has not been created yet.
  195. .NH
  196. Test Cases
  197. .PP
  198. One you have a running system; the following can be used to run the
  199. standard test cases.
  200. First load the file test.st.  If you are using the windowing interface
  201. select the fileIn menu item and the file ``test.st'' (from the ST Sources
  202. folder), if you are using the tty interface use the following command
  203. .DS I
  204. File new; fileIn: 'test.st'
  205. .DE
  206. Then give the command to run all test cases.
  207. .DS I
  208. Test new all
  209. .DE
  210. Messages will be displayed as test cases are performed, and if any test
  211. cases fail.
  212. .NH
  213. The Standard Window Package
  214. .PP
  215. There is an experimental windows style interface based on Guido van rossums
  216. standard window package.  This permits the system to work on top of
  217. X-windows, as well as the macintosh.  Information on standard windows
  218. can be obtained directly from guido at guido@mcvax.uucp, or mcvax!guido, or
  219. possibly gvr@src.dec.com.
  220. His paper mail address is Guido van Rossum, Center for Mathematics and
  221. Computer Science, P.O. Box 4079, 1009 AB Amsterdam, The Netherlands.
  222. Sources for the standard window package are not included on the Little
  223. Smalltalk distribution, but they are available public domain by ftp from
  224. DEC SRC, machine gatekeeper.dec.com (address [128.45.9.52]).
  225. The subdirectory is pub/stdwin.
  226. Contact guido for more details.
  227. .PP
  228. To make the projects for the macintosh version, follow guidos instructions.
  229. For other versions, make a file stdw.o by linking together all of guidos
  230. sources for your particular system.
  231. Here is a makefile for the X11 version, for example.
  232. .DS L
  233. #
  234. # X11 version of stdwins
  235. #
  236. x11 = caret.o draw.o font.o menu.o timer.o cutbuffer.o \
  237. error.o general.o scroll.o window.o dialog.o event.o \
  238. llevent.o system.o
  239. alfa = bind.o draw.o event.o keymap.o measure.o menu.o scroll.o stdwin.o syswin.o
  240. gen = askfile.o  perror.o
  241. textedit = editwin.o textdbg.o textedit.o textlow.o textbrk.o
  242. tools = endian.o getopt.o glob.o monocase.o strdup.o swap.o
  243. x11files = ${x11} ${gen} ${textedit} ${tools}
  244.  
  245. stdw.o:  ${x11files}
  246.     ld -r -o stdw.o ${x11files}
  247.  
  248. .DE
  249. .PP
  250. I emphasize this interface is very fragile.
  251. .NH 
  252. Possible Changes
  253. .PP
  254. There are a couple of easy changes you may want to make at your site.
  255. The default editor is vi (indicated by the value of the global variable set
  256. in the routine createGlobals in either tty.st or stdwin.st); this can be
  257. changed to any other editor you like.
  258. The system also prints the current object count prior to asking for
  259. commands from the user.  This can be eliminated by removing the primitive <2> 
  260. from the method initialize, class Scheduler, file tty.st.
  261.